<?php
error_reporting(0);
set_magic_quotes_runtime(0);

function_exists('date_default_timezone_set') && date_default_timezone_set('Hongkong');
$timestamp = time();

__FILE__ == '' && die('Fatal error code: 0');

define("IN_MYMPS",true);
define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc());
define("MYMPS_ROOT",dirname(__FILE__));
define('MYMPS_DATA',MYMPS_ROOT.'/data');
define('MYMPS_INC',MYMPS_ROOT.'/include');
define('MYMPS_SMARTY',MYMPS_INC.'/smarty');
define('MYMPS_TPL',MYMPS_ROOT.'/template');

if (!MAGIC_QUOTES_GPC && $_FILES) $_FILES = addslashes($_FILES);

if(PHP_VERSION < '4.1.0') {
	$_GET		=	&$HTTP_GET_VARS;
	$_SERVER	=	&$HTTP_SERVER_VARS;
	unset($HTTP_GET_VARS,$HTTP_SERVER_VARS);
}

$part = isset($_REQUEST['part']) ? trim($_REQUEST['part']) : '';
$action = isset($_REQUEST['action']) ? trim($_REQUEST['action']) : '';
$ac  = isset($_REQUEST['ac']) ? trim($_REQUEST['ac']) : '';
$url = isset($_REQUEST['url']) ? trim($_REQUEST['url']) : '';
$userid = isset($_REQUEST['userid']) ? trim($_REQUEST['userid']) : '';
$password = isset($_GET['password']) ? trim($_GET['password']) : '';
$admindir = isset($_GET['admindir']) ? trim($_GET['admindir']) : '/admin';
$report_type = isset($_POST['report_type']) ? trim($_POST['report_type']) : '';
$id = isset($_GET['id']) ? intval($_GET['id']) : (isset($_POST['id']) ? intval($_POST['id']) : '');

!in_array($part,array('upgrade','report','do_report','information','chk_remember','checkmemberinfo','sp_testdirs','adminmenu','member','memberinfopost','advertisement','jswizard')) && exit('FORBIDDEN');

require_once MYMPS_ROOT."/include/common.fun.php";
require_once MYMPS_DATA."/config.php";
include MYMPS_INC.'/box/'.$part.'.php';

is_object($db) && $db->Close();
$mymps_global = $db = $part = $action = $url = $userid = $password = $admindir = $report_type = $timestamp = NULL;
?>